<?php echo $this->Html->script(array( HOST.'/jquery.tn3lite.min' ),$options = array('allowCache'=>false,'safe'=>false,'inline'=>false));?>
<?php echo $this->Html->css(array(HOST.'/tn3/tn3'),null,array('inline'=>false));?>


<?php
echo $javascript->codeBlock("
    	$(document).ready(function() {
    		var tn1 = $('.mygallery').tn3({
    		    skinDir:'skins',
    		    autoplay:true,
    		    width:623,
    		    height:360,
    		    delay:5000,
    		    imageClick:'fullscreen',
    		    image:{
    			crop:true,
    			transitions:[{
    			    type:'blinds',
    			    duration:300
    			    },
    			    {
    			    type:'grid',
    			    duration:160,
    			    gridX:9,
    			    gridY:7,
    			    easing:'easeInCubic',
    			    sort:'circle'
    			    },{
    			    type:'slide',
    			    duration:430,
    			    easing:'easeInOutExpo'
    			    }]
    		    }
    		    });
    	});
		",$options = array('allowCache'=>false,'safe'=>false,'inline'=>false));
?>
		
	    <div class="mygallery">
	        <div class="tn3 album">
	             <ol>
	             	<?php 
	             	foreach ($gallery as $image){
		           	?>
	            	<li>
	        		    <?php echo $html->link($html->image('/files/'.HOST.'/upload/'.$image['name'],array('width'=>35,'height'=>35,'alt'=>'slide1')),'/files/'.HOST.'/upload/'.$image['name'],array('escape'=>false));?>
	
	                </li>
	            	<?php }?>
	            </ol>
	        </div>
	    </div>   